Skip to content

Add Dependabot for actions and a weekly plugin update workflow - #12

Merged
SimonKimDev merged 1 commit into
mainfrom
simonk/dev/dependency-updates
Oct 17, 2026
Merged

SimonKimDev merged 1 commit into
mainfrom
simonk/dev/dependency-updates

Conversation

@SimonKimDev

Copy link
Copy Markdown
Owner

Dependabot can't update lazy-lock.json (lazy.nvim isn't a supported ecosystem), so this splits dependency updates in two:

  • .github/dependabot.yml: GitHub Actions only, monthly, one grouped PR. Skips *.lock.yml so it doesn't edit the gh-aw files from Add an AI PR reviewer #10; gh aw upgrade refreshes those.
  • .github/workflows/plugin-update.yml: every Monday (or on demand) runs :Lazy update, commits lazy-lock.json to simonk/dev/plugin-update, and opens or refreshes an Update plugins PR with a compare link per plugin. PRs made with GITHUB_TOKEN don't trigger workflows, so it dispatches ci.yml on the branch and the smoke test still runs on the new commits. It won't force-push over the branch once someone else has committed to it.
  • .github/actions/setup-nvim: the Neovim install / XDG isolation / make steps from ci.yml, now shared by both workflows. The Neovim version lives here now.

On this PR the updater does a dry run (no push, no PR) and puts the would-be PR body in the job summary.

Tested locally: the update script on a fresh copy changed 33 plugins with no errors, and the smoke test passes on the updated plugins.

Before the first scheduled run: turn on Settings → Actions → General → Allow GitHub Actions to create and approve pull requests, otherwise gh pr create fails. It's off now.

Dependabot can't update lazy.nvim plugins, so it only covers GitHub
Actions: monthly, grouped, skipping gh-aw's generated *.lock.yml files.

plugin-update.yml runs :Lazy update every Monday, commits lazy-lock.json
to simonk/dev/plugin-update, opens or refreshes a PR with compare links,
and dispatches CI on it so the smoke test covers the new commits. On PRs
that change the updater it only does a dry run.

The Neovim install steps move into .github/actions/setup-nvim so CI and
the updater share them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 90315f97-7c82-4bc1-9bf1-2f8460782554
@SimonKimDev
SimonKimDev marked this pull request as ready for review October 16, 2026 22:47
@SimonKimDev

Copy link
Copy Markdown
Owner Author

/review

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ PR re-review completed successfully!

Reviewed by PR re-review. Comment /review to run it again.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Only one reviewer completed this round; comment /review to retry.

The PR extracts a reusable setup-nvim action and adds a weekly plugin-update workflow, a Dependabot config and an updater script. The structure is clean, and the branch-ownership guard is a thoughtful touch.

Main findings:

  • Supply chain (high): nvim runs unreviewed plugin code and build steps while a write-scoped token is in the environment. Split it into a read-only update job and a publish job.
  • Force push (low): it can overwrite the branch when no PR is open.
  • Docs (low): the reviewer agent still looks for the Neovim version in ci.yml.

After merging: turn on Allow GitHub Actions to create and approve pull requests in Settings → Actions → General, as the README notes.

Review context and counts
Reviewers claude-reviewer (completed), gpt-reviewer (unavailable: model routing error, failed twice)
Raw findings claude: 4, gpt: 0
After merging duplicates 4
Agreed by both 0
Disputed 0 (kept 0, dropped 0)
Dropped 1 (Dependabot exclude-paths glob; low confidence, not confirmable from the code)
Published 3
Consensus reached True
Review confidence 45

Reviewed by PR re-review. Comment /review to run it again.
Comment /review to run again

inputs:
version:
description: Neovim release to install
default: 0.11.4 # keep in sync with the Neovim you run locally

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pinned Neovim version now lives here, but .github/agents/pr-reviewer.agent.md (line 28) still tells reviewers to find it in .github/workflows/ci.yml, which no longer has one. Point that line at .github/actions/setup-nvim/action.yml, or reviewers can't tell which Neovim API level to check against.

env:
BRANCH: simonk/dev/plugin-update
BOT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GH_TOKEN: ${{ github.token }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supply chain: the Update plugins step runs nvim, which loads your whole config, pulls the newest unreviewed commit of every plugin with :Lazy update, and runs their build steps (make for telescope-fzf-native and LuaSnip). This job has contents: write, pull-requests: write and actions: write. The token is exposed in two ways:

  1. GH_TOKEN here is in the job-level env, so nvim and every build it spawns inherit it.
  2. actions/checkout keeps the token in the git config by default (persist-credentials: true).

A compromised or broken plugin could push to main (if branch protection allows it), edit workflows or start other workflows. The pull_request dry run has the same exposure for same-repo branches.

Suggested fix: split into two jobs.

  • update: permissions: contents: read, persist-credentials: false, no GH_TOKEN. It runs nvim, then uploads lazy-lock.json and pr-body.md with actions/upload-artifact.
  • publish: needs: update, if: github.event_name != 'pull_request', with the write permissions. It downloads the artifact and does the commit, push, gh pr and gh workflow run steps. Neovim never runs here.

Docs: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions

git config user.email $env:BOT_EMAIL
git switch --quiet -C $env:BRANCH
git commit --quiet -m 'Update plugins' -- lazy-lock.json
git push --quiet --force origin "HEAD:refs/heads/$env:BRANCH"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The author check only runs when an open PR exists. If the branch is left behind after a PR is closed without merging, --force overwrites whatever is on it, including your own fix commits. A commit that lands between the check and the push is also overwritten.

Consider recording the remote SHA (git ls-remote origin refs/heads/$env:BRANCH), checking its authors even without a PR, and pushing with --force-with-lease=refs/heads/${env:BRANCH}:<sha>. Docs: (gitscm.com/redacted) Minor, since the instructions already say not to reuse the branch.

@SimonKimDev
SimonKimDev merged commit 045e34a into main Oct 17, 2026
3 checks passed
@SimonKimDev
SimonKimDev deleted the simonk/dev/dependency-updates branch October 17, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant